#!/usr/bin/env node
var tracker = require('./tracker.js').init({port: 8082});
tracker.on('connection', function(tunnel) {
  console.log('tunnel connected');
  tunnel.mobile.on('mobilePosition', function(pos) {
    console.log('mobile position!!!');
    tunnel.browser.emit('updatePosition', pos);
  });
  
  tunnel.browser.on('slower', function() {
    console.log('SLOWERRRRR!!!!');
    tunnel.mobile.emit('slower');
  });
});

